import request from '@/utils/request'
// import store from '@/store'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function getUserInfo() {
  return request({
    method: 'post',
    url: '/sys/profile'
    // headers: {
    //   Authorization: `Bearer ${store.getters.token}`
    // }
  })
}
export function getUserDetail(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
